<form action="advertisements.php" method="post" id = "search">
    <?php
    if(!get_magic_quotes_gpc())
    {
        $searchterm_title = addslashes($searchterm_title);
        $searchterm_desc  = addslashes($searchterm_desc);
        $searchterm_date  = addslashes($searchterm_date);
		$searchterm_apr   = addslashes($searchterm_apr);
    }

    if (mysqli_connect_error())
    {
        echo 'Error: could not connect to database. Please try again later.';
        exit;
    }
    ?>
    
    <table class = "table_search">
        <tr>
            <td><label>Title</label></td>
            <td><input id="searchterm_title" class="search_input" type="text" name="searchterm_title"></td>

            <td><label>Description</label></td>
            <td><input id="searchterm_desc" class="search_input" type="text" name="searchterm_desc"></td>

            <td><label>Date</label></td>
            <td><input id="searchterm_date" class="search_input" type="date" name="searchterm_date"></td>
            <td><label>Approved</label></td>
            <td><select id="searchterm_apr" name="searchterm_apr">
            <option value=>All</option>            	 
            <option value="0">Not Approved</option>
            <option value="1">Approved</option>           
</select></td>
            
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
    </table>
    <input type="submit" value="Search" id="search_btn">    
    
    
</form>